/**
 * 
 */
package org.xlab.baseframework.domain.view;

import java.text.SimpleDateFormat;

import org.xlab.baseframework.domain.SystemWebServiceSession;
import org.xlab.baseframework.domain.enumerate.EnumWebServiceClientType;
import org.xlab.baseframework.system.Declare;

/**
 * @author makubex
 *
 */
public class SystemWebServiceSessionVO extends
		AbstractLogicalVersionControlViewObject<SystemWebServiceSession> {

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = -334738138137112972L;

	private Long id;
	private String sessionId;
	private String clientId;
	private EnumWebServiceClientType clientType;
	
	public SystemWebServiceSessionVO(SystemWebServiceSession pojo) {
		super(pojo);
		this.id = pojo.getId();
		this.sessionId = pojo.getSessionId();
		this.clientId = pojo.getClientId();
		this.clientType = pojo.getClientType();
		this.createdBy = pojo.getCreatedBy();
		this.lastUpdatedBy = pojo.getLastUpdatedBy();
		SimpleDateFormat sdf = new SimpleDateFormat(
				Declare.SYSTEM_LONG_DATE_FORMAT + Declare.SPACE
						+ Declare.SYSTEM_LONG_TIME_FORMAT);
		this.createdTime = pojo.getCreatedTime();
		if (this.createdTime != null)
			this.s_createdTime = sdf.format(this.createdTime);
		this.lastUpdatedTime = pojo.getLastUpdatedTime();
		if (this.lastUpdatedTime != null)
			this.s_lastUpdatedTime = sdf.format(this.lastUpdatedTime);
	}

	/**
	 * @return the clientId
	 */
	public String getClientId() {
		return clientId;
	}

	/**
	 * @return the clientType
	 */
	public EnumWebServiceClientType getClientType() {
		return clientType;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @return the sessionId
	 */
	public String getSessionId() {
		return sessionId;
	}

}
